import request from '@/utils/request'
import store from '@/store/index'

export function updateteachsummary(summary) {
  return request({
    url: '/teachsummary/',
    method: 'put',
    params: {
      plansTeacherId: store.getters.userId,
      teachStudentEvaluation: summary.teachStudentEvaluation, // 学生评价
      teachEvaluation: summary.teachEvaluation, // 教学评价
      teachId: summary.teachId // 教学总结id
    }
  })
}

export function deleteteachsummary(id) {
  return request({
    url: '/teachsummary/',
    method: 'delete',
    params: {
      teachSummaryId: id
    }
  })
}

export function getAllteachsummary(BB) {
  return request({
    url: '/teachsummary/all/TeacherIdJurisdictionEight',
    method: 'get',
    params: {
      staffId: BB
    }
  })
}

export function getAllteachsummaryByMedical(BB) {
  return request({
    url: '/teachsummary/all/MedicalDirectorIdJurisdictionZero',
    method: 'get',
    params: {
      staffId: BB
    }
  })
}

export function getAllteachsummaryByDirector(BB) {
  return request({
    url: '/teachsummary/all/TeachingDirectorJurisdictionSix',
    method: 'get',
    params: {
      staffId: BB
    }
  })
}

export function getAllteachsummaryByprincipal(BB) {
  return request({
    url: '/teachsummary/all/principalTeacherJurisdictionSeven',
    method: 'get',
    params: {
      staffId: BB
    }
  })
}

export function getAllteachsummaryAA() {
  return request({
    url: '/teachsummary/all',
    method: 'get'

  })
}

export function selectclazz() {
  return request({
    url: '/clazz/all',
    method: 'get'

  })
}

export function getteachsummarybyId(id) {
  return request({
    url: '/teachsummary/studentId/all',
    method: 'get',
    params: {
      studentId: id
    }
  })
}

export function addoneteachsummary(summary) {
  return request({
    url: 'teachsummary/insert',
    method: 'post',
    data: {
      teachEvaluation: summary.teachEvaluation,
      teachStudentEvaluation: summary.teachStudentEvaluation,
      teachClazzId: summary.teachClazzId,
      teachStuid: summary.teachStuid,
      teachPostUserId: summary.teachPostUserId,
      handleAddUser: summary.summary
    }
  })
}

// export function getAllstudentName() {
//   return request({
//     url: "/student/selectStudentNameAndAdd",
//     method: "get"
//   });
// }
